/*
 * Selling Partner API for Replenishment
 *
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * The version of the OpenAPI document: 2022-11-07
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.replenishment.v2022_11_07
{
    /// <summary>
    /// Use these parameters to filter results. Any result must match all of the provided parameters. For any parameter that is an array, the result must match at least one element in the provided array.
    /// </summary>
    [DataContract(Name = "ListOffersRequestFilters")]
    public partial class ListOffersRequestFilters : IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ListOffersRequestFilters" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ListOffersRequestFilters() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListOffersRequestFilters" /> class.
        /// </summary>
        /// <param name="marketplaceId">The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace. (required).</param>
        /// <param name="skus">A list of SKUs to filter. This filter is only supported for sellers and not for vendors..</param>
        /// <param name="asins">A list of Amazon Standard Identification Numbers (ASINs)..</param>
        /// <param name="eligibilities">A list of eligibilities associated with an offer..</param>
        /// <param name="preferences">preferences.</param>
        /// <param name="promotions">promotions.</param>
        /// <param name="programTypes">A list of replenishment program types. (required).</param>
        public ListOffersRequestFilters(string marketplaceId = default(string), List<string> skus = default(List<string>), List<string> asins = default(List<string>), List<EligibilityStatus> eligibilities = default(List<EligibilityStatus>), Preference preferences = default(Preference), Promotion promotions = default(Promotion), List<ProgramType> programTypes = default(List<ProgramType>))
        {
            // to ensure "marketplaceId" is required (not null)
            if (marketplaceId == null)
            {
                throw new ArgumentNullException("marketplaceId is a required property for ListOffersRequestFilters and cannot be null");
            }
            this.MarketplaceId = marketplaceId;
            // to ensure "programTypes" is required (not null)
            if (programTypes == null)
            {
                throw new ArgumentNullException("programTypes is a required property for ListOffersRequestFilters and cannot be null");
            }
            this.ProgramTypes = programTypes;
            this.Skus = skus;
            this.Asins = asins;
            this.Eligibilities = eligibilities;
            this.Preferences = preferences;
            this.Promotions = promotions;
        }

        /// <summary>
        /// The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.
        /// </summary>
        /// <value>The marketplace identifier. The supported marketplaces for both sellers and vendors are US, CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL. Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the identifier for the marketplace.</value>
        [DataMember(Name = "marketplaceId", IsRequired = true, EmitDefaultValue = true)]
        public string MarketplaceId { get; set; }

        /// <summary>
        /// A list of SKUs to filter. This filter is only supported for sellers and not for vendors.
        /// </summary>
        /// <value>A list of SKUs to filter. This filter is only supported for sellers and not for vendors.</value>
        [DataMember(Name = "skus", EmitDefaultValue = false)]
        public List<string> Skus { get; set; }

        /// <summary>
        /// A list of Amazon Standard Identification Numbers (ASINs).
        /// </summary>
        /// <value>A list of Amazon Standard Identification Numbers (ASINs).</value>
        [DataMember(Name = "asins", EmitDefaultValue = false)]
        public List<string> Asins { get; set; }

        /// <summary>
        /// A list of eligibilities associated with an offer.
        /// </summary>
        /// <value>A list of eligibilities associated with an offer.</value>
        [DataMember(Name = "eligibilities", EmitDefaultValue = false)]
        public List<EligibilityStatus> Eligibilities { get; set; }

        /// <summary>
        /// Gets or Sets Preferences
        /// </summary>
        [DataMember(Name = "preferences", EmitDefaultValue = false)]
        public Preference Preferences { get; set; }

        /// <summary>
        /// Gets or Sets Promotions
        /// </summary>
        [DataMember(Name = "promotions", EmitDefaultValue = false)]
        public Promotion Promotions { get; set; }

        /// <summary>
        /// A list of replenishment program types.
        /// </summary>
        /// <value>A list of replenishment program types.</value>
        [DataMember(Name = "programTypes", IsRequired = true, EmitDefaultValue = true)]
        public List<ProgramType> ProgramTypes { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ListOffersRequestFilters {\n");
            sb.Append("  MarketplaceId: ").Append(MarketplaceId).Append("\n");
            sb.Append("  Skus: ").Append(Skus).Append("\n");
            sb.Append("  Asins: ").Append(Asins).Append("\n");
            sb.Append("  Eligibilities: ").Append(Eligibilities).Append("\n");
            sb.Append("  Preferences: ").Append(Preferences).Append("\n");
            sb.Append("  Promotions: ").Append(Promotions).Append("\n");
            sb.Append("  ProgramTypes: ").Append(ProgramTypes).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
